﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int year = DateTime.Now.Year;
        int month = DateTime.Now.Month;

        for (int i = year - 10; i <= year; i++)
        {
            tjyear.Items.Add(new ListItem(i.ToString(), i.ToString()));
        }

        for (int i = 1; i < 13; i++)
        {
            tjmonth.Items.Add(new ListItem(i.ToString(), i.ToString()));
        }
        
        if (Request.QueryString["tjyear"] != null)
        {
            tjyear.Items.FindByText(Request.QueryString["tjyear"].ToString()).Selected = true;
            tjmonth.Items.FindByText(Request.QueryString["tjmonth"].ToString()).Selected = true;
        }
        else
        {
            tjyear.Items.FindByText(year.ToString()).Selected = true;
            tjmonth.Items.FindByText(month.ToString()).Selected = true;
        }
        /*
        tjlx.Items.Add(new ListItem("单法院统计","0"));
        tjlx.Items.Add(new ListItem("中院统计", "1"));
        tjlx.Items.FindByText("单法院统计").Selected = true;

        string[] tjfyname = new string[10];

        tjfyname[0] = "城中法院";
        tjfyname[1] = "鱼峰法院";
        tjfyname[2] = "柳南法院";
        tjfyname[3] = "柳北法院";
        tjfyname[4] = "柳江法院";
        tjfyname[5] = "柳城法院";
        tjfyname[6] = "鹿寨法院";
        tjfyname[7] = "融安法院";
        tjfyname[8] = "融水法院";
        tjfyname[9] = "三江法院";

        if (tjlx.Value == "1")
        {
            tjfy.Items.Add(new ListItem("柳州中院", "0"));
        }
        else
        {
            for (int i = 0; i <= 9; i++)
            {
                tjfy.Items.Add(new ListItem(tjfyname[i].ToString(), i.ToString()));
            }
        }
        */

        tjbm.Items.Add(new ListItem("执行局","1"));
    }
}
